//
//  ViewController.m
//  类方法
//
//  Created by webplus on 17/8/30.
//  Copyright © 2017年 sanyi. All rights reserved.
//

#import "ViewController.h"
#import "Person.h"
@interface ViewController ()
@property (nonatomic,strong) Person *person1;
@end

@implementation ViewController
{
    Person *_person2;
    NSMutableArray *_arr;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    [Person doSomeWok];
    
    Person *person = [[Person alloc]init];
    [person doWork];
    self.person1 = [[Person alloc]init];
    [self.person1 doWork];
    _person2 = [[Person alloc]init];
    [self->_person2 doWork];
    _arr = [NSMutableArray new];
    for (int i = 0; i<10; i++) {
        self.person1 = [[Person alloc]init];
        NSLog(@"1");
        [_arr addObject:_person1];
    }
    
}
- (IBAction)btnClick:(id)sender {
    
    NSLog(@"%@",_arr);
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
